import java.net.MalformedURLException;
import java.rmi.*;
import java.rmi.registry.LocateRegistry;
import java.rmi.registry.Registry;

public class ChatServerMain
{
    public static void main(String[] args)
    {
    	try {
			Registry registry = LocateRegistry.createRegistry(1099);
		     ChatServerImpl server = new ChatServerImpl();

		     //Naming.rebind("rmi://141.56.64.54/ChatServer", server);
		      Naming.rebind("rmi://127.0.0.1/ChatServer", server);
	    }catch (Exception e) {
			e.printStackTrace();
	    }
    }
}
